<div ng-if="pagedata.op=='main'" class='fui-page  fui-page-current'>
    <div class="fui-header">
        <div class="fui-header-left" ng-click="goback()">
			 <a class="back"></a>
		</div>
        <div class="title">商品入库</div>
        <div class="fui-header-right">&nbsp;</div>
    </div>
    <div class='fui-content'>
		<div style="padding:0.5rem">
        <div ng-if="pagedata.depot" class='fui-list-group'>
            <div class='fui-list'>
                <div class='fui-list-inner'>
                    <div class='title'>{{pagedata.depot.title}}</div>
                </div>
            </div>

        </div>
        <div class='fui-list-group'>
            <div class='fui-list'>
                <div class='fui-list-media'><img ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/nopic.jpg'}}"/></div>
                <div class='fui-list-inner'>
                    <div class='title'>{{pagedata.saler.title}}</div>
                </div>
            </div>
        </div>
		<div class="fui-list jump text-center">
			<div ng-click="pagedata.scancode()" style="width:100%">
					 <div><i class="icon jinyunicon icon-saoyisao1" style="font-size:3rem;color:#63BE72"></i></div>
					 <div class="subtitle" style="color: #63BE72;font-size:0.8rem">或点击扫码，扫商品二维码！</div>
			</div>
		</div>
    </div>
</div>
</div>
<div ng-if="pagedata.op=='up'" class='fui-page  fui-page-current'>
    <div class="fui-header">
	<div class="fui-header-left">
	    <a class="back" ng-click="goback()"></a>
	</div>
	<div class="title">入库商品</div> 
	<div class="fui-header-right">&nbsp;</div>
    </div>
    <div class='fui-content'>
		<div class="jy-content">
		<div class="weui_msg">
		<div class="weui_icon_area">
			<i class="weui_icon_success weui_icon_msg"></i>
		</div>
		<div class="weui_text_area">
			<p class="weui_msg_desc">入库成功</p>
		</div>
		</div>
		<div class='fui-list-group' style='margin-top:5px;'>
			<div class='fui-list'>
			<div class='fui-list-media'>供货商：</div>
			<div class='fui-list-inner'>
				<div class='title'>{{pagedata.merch.merchname}}</div>
			</div>
			</div>
		</div>
		<div class="fui-list-group goods-list-group" style="background:#fff">  
			<div>
				<div class="fui-list goods-list"  style="background:#fff">
					<div class="fui-list-media">
						<img ng-src="{{tomedia(pagedata.goods.image)}}" class="round">
					</div>
					<div class="fui-list-inner">
					<div class="text goodstitle">{{pagedata.goods.title}}  <i ng-if="pagedata.goods.leititle" class="fui-tag fui-tag-red">{{pagedata.goods.leititle}}</i></div> 
					</div>
					<div class='fui-list-angle'>
						{{pagedata.goods.num}}{{pagedata.goods.unit}}
					</div>
				</div>
			</div>
		</div>
		<div class="fui-list jump text-center">
			<div ng-click="pagedata.scancode()" style="width:100%">
					 <div><i class="icon jinyunicon icon-saoyisao1" style="font-size:3rem;color:#63BE72"></i></div>
					 <div class="subtitle" style="color: #63BE72;font-size:0.8rem">或点击扫码，继续入库商品！</div>
			</div>
		</div>
		</div>
	 </div>
</div>
<script language="javascript">
scope.pagedata.scancode=function () {
			console.log('scanQRCodeOK');
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					var url=scope.tool.custom_url('jy_supplier/goodslog/up/'+result,true);
					location.href = url;
				}
			});
}
</script> 